# -*- coding: utf-8 -*-
from django import forms
from .models import * 

def getList():
	tall=Test2.objects.filter(id=2)
	tlist=[]
	for item in tall:
		oneItem=(item.id,item)
		tlist.append(oneItem)


	return tuple(tlist)


class Test1Form(forms.ModelForm):
	main1f  = models.CharField(max_length=100)
	main2f  = models.CharField(max_length=100)
	namefield = forms.ChoiceField()
	#pass

	def __init__(self, *args, **kwargs):
		super(Test1Form, self).__init__(*args, **kwargs)
		self.fields['namefield'].choices = ((u'0', u"可预定"),(u'1', u"未开放"),)
		#self.fields['namefield'].choices = getList()

	



   


